<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="./css/mui.min.css" rel="stylesheet" />
		<script src="./lib/jquery-2.1.4.js"></script>
		<script src="/web/statics/public/js/base.js"></script>
		<script src="./js/mui.min.js"></script>
		
		<style>	
		.mui-search .mui-placeholder {pointer-events: none;}
			/* .bar5 {background: #683B4D;} */
			.bar5 input, .bar5 button {/* background: transparent; */}
			.bar5 input { /* border: 2px solid #C8C7CC; */}
			/* .bar5 button { top: 0;right: 0;} */
			/* .bar5 button:before {content: '' font-family: FontAwesome;font-size: 16px;/* color: #F9F0DA; */} */
			.bar5 input:focus{ /* border-color: #311c24 *//* background: #ffffff; */ }
			div.search {padding: 7px 0;}
			.search form { position: relative;width: 200px;/* margin: 0 auto; */float: right;}
			/* .search input, button {border: none;outline: none;} */
			.search input {border: none;outline: none;}
			#search {width: 100%; height: 30px;border-radius: 40px;font-size: 14px;}
			/* .search button{height: 28px;width: 28px;position: absolute;margin: 1px;border-radius: 40px;background: url(imgs/search.png);background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;} */
			.search span{height: 20px;width: 20px;position:absolute;    margin-top: 5px;margin-right: 5px;border-radius: 40px;display: none;}
			.bar5 span:before {content: '' font-family: FontAwesome;font-size: 16px;/* color: #F9F0DA; */}
			.bar5 span { top: 0;right: 0;}
			
				
			/* .search button:active{background:#ffffff;}	 */
			/* .search button:focus{height: 28px;width: 28px;position: absolute;margin: 1px;border-radius: 40px;background: url(imgs/search.png);background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;}	 */
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav " style="background: #2f1d1a;">
			
			<div class="search bar5">
<!-- 				<a class="mui-action-back mui-icon mui-icon-left-nav " style="padding-left:10px;padding-top:3px;padding-bottom:5px;"></a> -->
				<a class="mui-icon mui-pull-right" id="sys_1"  style="font-size: 12px;margin-left: 5px;">&nbsp;扫一扫</a>
				<a class="mui-icon mui-pull-right" id="sys_2"  style="font-size: 12px;margin-left: 5px;">+</a>
			
			<form>
					<input id = "search"  type="text" placeholder="请输入巡查点">
					<!-- <button type="button"></button> -->
					<span id="clearSearch" class="mui-badge mui-badge-purple">X</span>
			</form>
			
		</div>
		
		</header>
	<nav class="mui-bar mui-bar-tab" id="nav" style="border-top: 1px solid  #C0C0C0;">
		<a class="mui-tab-item" href="xclist.html">
			<span class="mui-icon mui-icon-person-filled"></span>
			<span class="mui-tab-label">寻查</span>
		</a>
		<a class="mui-tab-item" href="mesIndex.html">
			<span class="mui-icon mui-icon-person-filled"></span>
			<span class="mui-tab-label">消息</span>
		</a><a class="mui-tab-item" href="user.html">
			<span class="mui-icon mui-icon-person-filled"></span>
			<span class="mui-tab-label">我的</span>
		</a>
		
	</nav>
		
		<div class="mui-content">
			<ul class="mui-table-view" id="xctype">
			</ul>
		</div>
		<script type="text/javascript" charset="utf-8">
			mui.init();	
			document.getElementById("sys_1").addEventListener("tap", function() {
// 				mui.openWindow({
// 					url: 'sys.html', //通过URL传参
// 					id: 'sys.html' 
// 				});
			});
			$(document).ready(function(){
				//mui.init();
				$("#nav a").on("click",trans);
				document.getElementById("clearSearch").addEventListener("tap",function(){
					document.getElementById("search").value="";
					document.getElementById("clearSearch").style.display="none";
				});
				document.getElementById("sys_2").addEventListener("tap",function(){
// 					mui.openWindow({
// 						url: 'xcd.html', //通过URL传参
// 						id: 'xcd.html'
// 					});
					window.open("xcd.html")
				});
				
				
				document.getElementById("search").addEventListener("input",function(e){
					// alert(e.target.value)
					document.getElementById("clearSearch").style.display="block";
				});
			});
			$.ajax({
		            url: "/h5prop/queryChktasklist",
					dataType:"JSON",
					type:"POST",
					data:{},
					success:function(data){
						// mui.toast(JSON.parse(data.length));
						var content="";
						var d = data;
						for(var i=0;i<d.chktasklist.length;i++){
							content+='<li onclick="queryDl(\''+d.chktasklist[i].id+'\',\''+d.chktasklist[i].chkpointname+'\')" class="mui-table-view-cell" style="font-size:14px;">巡查地点 :'+d.chktasklist[i].chkpointname+'<br>巡查时间：'+d.chktasklist[i].chktime+'<span class="mui-badge mui-badge-primary mui-left">'+d.chktasklist[i].iserror+'<p></span></li>';
						}
						document.getElementById("xctype").innerHTML=content;
						
					},
					error:function(e,type){
						//mui.toast(type);
					}
			});
			function queryDl(id,dd){
// 				mui.openWindow({
// 					url: 'uploadDetail.html', //通过URL传参
// 					id: id,
// 					extras: {
// 						dd: dd
// 					}
// 				});
			}
			function trans(e){
					window.location.href =this.getAttribute("href")
					this.target ="self"
			}
		</script> 
	</body>

</html>
